<?php

namespace App\Http\Controllers\api\Reservation;

use App\Http\Controllers\Controller;
use App\Jobs\ProcessPlaynum;
use Illuminate\Mail\Message;
use Illuminate\Support\Facades\Mail;
use App\Jobs\QueueAuth;
use App\Logic\reservation\ReservAtion;
use App\Server\ApiService;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Matrix\Exception;

class ApiReservationController extends Controller
{
    /**
     * @预约
     * @user wsg
     * @method post
     * @url https://www.healthcare.com/api/make/reservation_index
     * @data
     * @return \Illuminate\Http\Response
     */
    public function reservationIndex(Request $request)
    {
        try {
            $data = $request->post();
            //传输参数
            ReservAtion::reservAtion($data);
            return ApiService::success(1, '预约已成功提交，我们会尽快与您联系');
        } catch (Exception $exception) {
            Log::info($exception->getMessage());
        }
    }
}
